<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 200px;
            height: 100px;
            border: 3px solid #000;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="box" v-show="flag">我是第一个盒子</div>
        <div class="box" v-if="flag">我是第二个盒子</div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el:'#app',
            data:{
                flag:false
            }
        })
        //v-show和v-if的区别
        // v-show:会渲染到页面中，只是切换dispaly:none和display:block
        // v-if:是创建和删除
    </script>
</body>
</html>